<!--
  ~ Copyright (c) 2022, Nordic Semiconductor
  ~ All rights reserved.
  ~
  ~ Redistribution and use in source and binary forms, with or without modification, are
  ~ permitted provided that the following conditions are met:
  ~
  ~ 1. Redistributions of source code must retain the above copyright notice, this list of
  ~ conditions and the following disclaimer.
  ~
  ~ 2. Redistributions in binary form must reproduce the above copyright notice, this list
  ~ of conditions and the following disclaimer in the documentation and/or other materials
  ~ provided with the distribution.
  ~
  ~ 3. Neither the name of the copyright holder nor the names of its contributors may be
  ~ used to endorse or promote products derived from this software without specific prior
  ~ written permission.
  ~
  ~ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  ~ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
  ~ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
  ~ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  ~ HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  ~ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  ~ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
  ~ OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
  ~ OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  ~ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  ~ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  -->

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_152-release) on Fri Nov 17 17:43:02 CET 2017 -->
<title>DfuServiceListenerHelper</title>
<meta name="date" content="2017-11-17">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
    try {
        if (location.href.indexOf('is-external=true') == -1) {
            parent.document.title="DfuServiceListenerHelper";
        }
    }
    catch(err) {
    }
//-->
var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../no/nordicsemi/android/dfu/DfuServiceInitiator.html" title="class in no.nordicsemi.android.dfu"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../no/nordicsemi/android/dfu/DfuSettingsConstants.html" title="interface in no.nordicsemi.android.dfu"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?no/nordicsemi/android/dfu/DfuServiceListenerHelper.html" target="_top">Frames</a></li>
<li><a href="DfuServiceListenerHelper.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">no.nordicsemi.android.dfu</div>
<h2 title="Class DfuServiceListenerHelper" class="title">Class DfuServiceListenerHelper</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>no.nordicsemi.android.dfu.DfuServiceListenerHelper</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="typeNameLabel">DfuServiceListenerHelper</span>
extends java.lang.Object</pre>
<div class="block">A helper class that should be used to register listeners for DFU Service broadcast events.
 The <a href="../../../../no/nordicsemi/android/dfu/DfuProgressListener.html" title="interface in no.nordicsemi.android.dfu"><code>DfuProgressListener</code></a> should be registered to listen for DFU status updates and errors, while the <a href="../../../../no/nordicsemi/android/dfu/DfuLogListener.html" title="interface in no.nordicsemi.android.dfu"><code>DfuLogListener</code></a> listener receives the log updates.
 Listeners may be registered for a specified device (given with device address) or for any device. Keep in mind, that while updating the SoftDevice using the buttonless update
 the device may change its address in the bootloader mode.

 <p>Use <a href="../../../../no/nordicsemi/android/dfu/DfuServiceListenerHelper.html#registerProgressListener-android.content.Context-no.nordicsemi.android.dfu.DfuProgressListener-"><code>registerProgressListener(Context, DfuProgressListener)</code></a> or <a href="../../../../no/nordicsemi/android/dfu/DfuServiceListenerHelper.html#registerLogListener-android.content.Context-no.nordicsemi.android.dfu.DfuLogListener-"><code>registerLogListener(Context, DfuLogListener)</code></a> to register your listeners. Remember about unregistering them
 when your context is destroyed.</p></div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!--   -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuServiceListenerHelper.html#DfuServiceListenerHelper--">DfuServiceListenerHelper</a></span>()</code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuServiceListenerHelper.html#registerLogListener-android.content.Context-no.nordicsemi.android.dfu.DfuLogListener-">registerLogListener</a></span>(android.content.Context&nbsp;context,
                   <a href="../../../../no/nordicsemi/android/dfu/DfuLogListener.html" title="interface in no.nordicsemi.android.dfu">DfuLogListener</a>&nbsp;listener)</code>
<div class="block">Registers the <a href="../../../../no/nordicsemi/android/dfu/DfuLogListener.html" title="interface in no.nordicsemi.android.dfu"><code>DfuLogListener</code></a>.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuServiceListenerHelper.html#registerLogListener-android.content.Context-no.nordicsemi.android.dfu.DfuLogListener-java.lang.String-">registerLogListener</a></span>(android.content.Context&nbsp;context,
                   <a href="../../../../no/nordicsemi/android/dfu/DfuLogListener.html" title="interface in no.nordicsemi.android.dfu">DfuLogListener</a>&nbsp;listener,
                   java.lang.String&nbsp;deviceAddress)</code>
<div class="block">Registers the <a href="../../../../no/nordicsemi/android/dfu/DfuLogListener.html" title="interface in no.nordicsemi.android.dfu"><code>DfuLogListener</code></a>.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuServiceListenerHelper.html#registerProgressListener-android.content.Context-no.nordicsemi.android.dfu.DfuProgressListener-">registerProgressListener</a></span>(android.content.Context&nbsp;context,
                        <a href="../../../../no/nordicsemi/android/dfu/DfuProgressListener.html" title="interface in no.nordicsemi.android.dfu">DfuProgressListener</a>&nbsp;listener)</code>
<div class="block">Registers the <a href="../../../../no/nordicsemi/android/dfu/DfuProgressListener.html" title="interface in no.nordicsemi.android.dfu"><code>DfuProgressListener</code></a>.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuServiceListenerHelper.html#registerProgressListener-android.content.Context-no.nordicsemi.android.dfu.DfuProgressListener-java.lang.String-">registerProgressListener</a></span>(android.content.Context&nbsp;context,
                        <a href="../../../../no/nordicsemi/android/dfu/DfuProgressListener.html" title="interface in no.nordicsemi.android.dfu">DfuProgressListener</a>&nbsp;listener,
                        java.lang.String&nbsp;deviceAddress)</code>
<div class="block">Registers the <a href="../../../../no/nordicsemi/android/dfu/DfuProgressListener.html" title="interface in no.nordicsemi.android.dfu"><code>DfuProgressListener</code></a>.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuServiceListenerHelper.html#unregisterLogListener-android.content.Context-no.nordicsemi.android.dfu.DfuLogListener-">unregisterLogListener</a></span>(android.content.Context&nbsp;context,
                     <a href="../../../../no/nordicsemi/android/dfu/DfuLogListener.html" title="interface in no.nordicsemi.android.dfu">DfuLogListener</a>&nbsp;listener)</code>
<div class="block">Unregisters the previously registered log listener.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../no/nordicsemi/android/dfu/DfuServiceListenerHelper.html#unregisterProgressListener-android.content.Context-no.nordicsemi.android.dfu.DfuProgressListener-">unregisterProgressListener</a></span>(android.content.Context&nbsp;context,
                          <a href="../../../../no/nordicsemi/android/dfu/DfuProgressListener.html" title="interface in no.nordicsemi.android.dfu">DfuProgressListener</a>&nbsp;listener)</code>
<div class="block">Unregisters the previously registered progress listener.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!--   -->
</a>
<h3>Constructor Detail</h3>
<a name="DfuServiceListenerHelper--">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DfuServiceListenerHelper</h4>
<pre>public&nbsp;DfuServiceListenerHelper()</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a name="registerProgressListener-android.content.Context-no.nordicsemi.android.dfu.DfuProgressListener-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>registerProgressListener</h4>
<pre>public static&nbsp;void&nbsp;registerProgressListener(android.content.Context&nbsp;context,
                                            <a href="../../../../no/nordicsemi/android/dfu/DfuProgressListener.html" title="interface in no.nordicsemi.android.dfu">DfuProgressListener</a>&nbsp;listener)</pre>
<div class="block">Registers the <a href="../../../../no/nordicsemi/android/dfu/DfuProgressListener.html" title="interface in no.nordicsemi.android.dfu"><code>DfuProgressListener</code></a>. Registered listener will receive the progress events from the DFU service.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>context</code> - the application context</dd>
<dd><code>listener</code> - the listener to register</dd>
</dl>
</li>
</ul>
<a name="registerProgressListener-android.content.Context-no.nordicsemi.android.dfu.DfuProgressListener-java.lang.String-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>registerProgressListener</h4>
<pre>public static&nbsp;void&nbsp;registerProgressListener(android.content.Context&nbsp;context,
                                            <a href="../../../../no/nordicsemi/android/dfu/DfuProgressListener.html" title="interface in no.nordicsemi.android.dfu">DfuProgressListener</a>&nbsp;listener,
                                            java.lang.String&nbsp;deviceAddress)</pre>
<div class="block">Registers the <a href="../../../../no/nordicsemi/android/dfu/DfuProgressListener.html" title="interface in no.nordicsemi.android.dfu"><code>DfuProgressListener</code></a>. Registered listener will receive the progress events from the DFU service.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>context</code> - the application context</dd>
<dd><code>listener</code> - the listener to register</dd>
<dd><code>deviceAddress</code> - the address of the device to receive updates from (or null if any device)</dd>
</dl>
</li>
</ul>
<a name="unregisterProgressListener-android.content.Context-no.nordicsemi.android.dfu.DfuProgressListener-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unregisterProgressListener</h4>
<pre>public static&nbsp;void&nbsp;unregisterProgressListener(android.content.Context&nbsp;context,
                                              <a href="../../../../no/nordicsemi/android/dfu/DfuProgressListener.html" title="interface in no.nordicsemi.android.dfu">DfuProgressListener</a>&nbsp;listener)</pre>
<div class="block">Unregisters the previously registered progress listener.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>context</code> - the application context</dd>
<dd><code>listener</code> - the listener to unregister</dd>
</dl>
</li>
</ul>
<a name="registerLogListener-android.content.Context-no.nordicsemi.android.dfu.DfuLogListener-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>registerLogListener</h4>
<pre>public static&nbsp;void&nbsp;registerLogListener(android.content.Context&nbsp;context,
                                       <a href="../../../../no/nordicsemi/android/dfu/DfuLogListener.html" title="interface in no.nordicsemi.android.dfu">DfuLogListener</a>&nbsp;listener)</pre>
<div class="block">Registers the <a href="../../../../no/nordicsemi/android/dfu/DfuLogListener.html" title="interface in no.nordicsemi.android.dfu"><code>DfuLogListener</code></a>. Registered listener will receive the log events from the DFU service.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>context</code> - the application context</dd>
<dd><code>listener</code> - the listener to register</dd>
</dl>
</li>
</ul>
<a name="registerLogListener-android.content.Context-no.nordicsemi.android.dfu.DfuLogListener-java.lang.String-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>registerLogListener</h4>
<pre>public static&nbsp;void&nbsp;registerLogListener(android.content.Context&nbsp;context,
                                       <a href="../../../../no/nordicsemi/android/dfu/DfuLogListener.html" title="interface in no.nordicsemi.android.dfu">DfuLogListener</a>&nbsp;listener,
                                       java.lang.String&nbsp;deviceAddress)</pre>
<div class="block">Registers the <a href="../../../../no/nordicsemi/android/dfu/DfuLogListener.html" title="interface in no.nordicsemi.android.dfu"><code>DfuLogListener</code></a>. Registered listener will receive the log events from the DFU service.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>context</code> - the application context</dd>
<dd><code>listener</code> - the listener to register</dd>
<dd><code>deviceAddress</code> - the address of the device to receive updates from (or null if any device)</dd>
</dl>
</li>
</ul>
<a name="unregisterLogListener-android.content.Context-no.nordicsemi.android.dfu.DfuLogListener-">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>unregisterLogListener</h4>
<pre>public static&nbsp;void&nbsp;unregisterLogListener(android.content.Context&nbsp;context,
                                         <a href="../../../../no/nordicsemi/android/dfu/DfuLogListener.html" title="interface in no.nordicsemi.android.dfu">DfuLogListener</a>&nbsp;listener)</pre>
<div class="block">Unregisters the previously registered log listener.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>context</code> - the application context</dd>
<dd><code>listener</code> - the listener to unregister</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../no/nordicsemi/android/dfu/DfuServiceInitiator.html" title="class in no.nordicsemi.android.dfu"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../no/nordicsemi/android/dfu/DfuSettingsConstants.html" title="interface in no.nordicsemi.android.dfu"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?no/nordicsemi/android/dfu/DfuServiceListenerHelper.html" target="_top">Frames</a></li>
<li><a href="DfuServiceListenerHelper.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
